package cn.mw.cmdb.template.param;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * @description 模板导入参数
 */
@Getter
@Setter
@Schema(name = "TemplateImportParam", description = "模板导入参数")
public class TemplateImportParam {

    @Schema(description = "模板")
    private ImportRule templates;

    @Schema(description = "映射值")
    private ImportRule valueMaps;

    @Schema(description = "仪表盘")
    private ImportRule templateDashboards;

    @Schema(description = "模板的关联")
    private ImportRule templateLinkage;

    @Schema(description = "监控项")
    private ImportRule items;

    @Schema(description = "自动发现")
    private ImportRule discoveryRules;

    @Schema(description = "触发器")
    private ImportRule triggers;

    @Schema(description = "图标")
    private ImportRule graphs;

    @Schema(description = "WEB检测")
    private ImportRule httptests;


    @Getter
    @Setter
    @Schema(name = "ImportRule", description = "导入规则")
    public class ImportRule{

        @Schema(description = "如果设置为true，则会创建新的")
        private Boolean createMissing;

        @Schema(description = "如果设置为true，则会更新现有的")
        private Boolean updateExisting;

        @Schema(description = "如果设置为true，则会从数据库中删除导入数据中不存在的")
        private Boolean deleteMissing;
    }
}
